﻿using System;

namespace Mono.Cecil.Metadata
{
	// Token: 0x02000104 RID: 260
	internal sealed class GuidHeap : Heap
	{
		// Token: 0x06000A47 RID: 2631 RVA: 0x00005984 File Offset: 0x00003B84
		public GuidHeap(byte[] data) : base(data)
		{
		}

		// Token: 0x06000A48 RID: 2632 RVA: 0x0002E6D0 File Offset: 0x0002C8D0
		public Guid Read(uint index)
		{
			bool flag = index == 0U || (ulong)(index - 1U + 16U) > (ulong)((long)this.data.Length);
			Guid result;
			if (flag)
			{
				result = default(Guid);
			}
			else
			{
				byte[] array = new byte[16];
				Buffer.BlockCopy(this.data, (int)((index - 1U) * 16U), array, 0, 16);
				result = new Guid(array);
			}
			return result;
		}
	}
}
